From: Thomas Wood Date: Thu, 20 Aug 2009 20:39:04 +0000 (+0100) Subject: Bug 592507 - Javascript exception when ~/.gtk-bookmarks is missing X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~1013^2^2~10992 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=7fb8e2d0ef88be90444a6a1746b914aca6897623;p=gnome-shell.git Bug 592507 - Javascript exception when ~/.gtk-bookmarks is missing Check the file exists before trying to access it and simply return if it is not available. --- diff --git a/js/ui/places.js b/js/ui/places.js index b122c5d83..12bb8bd17 100644 --- a/js/ui/places.js +++ b/js/ui/places.js @@ -151,6 +151,9 @@ Places.prototype = { this._dirsBox.remove_all(); + if (!GLib.file_test(this._bookmarksPath, GLib.FileTest.EXISTS)) + return; + let [success, bookmarksContent, len] = GLib.file_get_contents(this._bookmarksPath); if (!success)